import instance from '@/utils/request'

// 获取评论或评论回复
export const getComments = params => {
  return instance.get('/app/v1_0/comments', { params })
}

// 对评论或评论回复点赞
export const addCommentLike = target => {
  return instance.post('/app/v1_0/comment/likings', { target })
}

// 取消对评论或评论回复点赞
export const deleteCommentLike = target => {
  return instance.delete(`/app/v1_0/comment/likings/${target}`)
}

// 添加评论或评论回复
export const addComments = data => {
  return instance.post('/app/v1_0/comments', data)
}
